<%= include header.ejs %>
    <%= include menu.ejs %>
    <div class="container">
        <div class="main-container">

            <div class="main clearfix">
                <article>

                    <h2><%= (group === null) ? 'New Group' : 'Edit ' + group.Name %></h2>
                    <hr>
                    <form method="post" role="form">
                        <div class="row" style="margin-left: -15px;">
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label for="inputName" class="control-label">Name</label>
                                    <input type="text" name="name" class="form-control" id="inputName" placeholder="Name"  value="<%= (group === null) ? '' : group.Name %>">
                                </div>
                                <div class="form-group">
                                    <button type="submit" name="submit" class="btn btn-success">Save</button>
                                </div>
                            </div>
                        </div>
                    </form>
                    <% if (group !== null) { %>
                        <form method="post">
                            <div class="form-group">
                                <button type="submit" name="delete" class="btn btn-danger">Delete</button>
                            </div>
                        </form>
                    <% } %>
                </article>
            </div> <!-- #main -->
        </div> <!-- #main-container -->
    </div>
<%= include footer.ejs %>
